import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useTradingAccountStore = defineStore('tradingAccount', () => {
  const currentTradingAccount = ref({})
  const tradingAccountList = ref([])

  function setCurrentTradingAccount(id, name, remark) {
    currentTradingAccount.value = {
      id,
      name,
      remark,
    }
  }

  function setTradingAccountList(dataList) {
    tradingAccountList.value = dataList
  }

  return {
    currentTradingAccount,
    setCurrentTradingAccount,
    tradingAccountList,
    setTradingAccountList,
  }
})
